package com.example.srb.core.controller.admin;


import com.alibaba.fastjson.JSON;
import com.example.srb.common.result.Result;
import com.example.srb.core.hfb.RequestHelper;
import com.example.srb.core.pojo.entity.LendItem;
import com.example.srb.core.pojo.vo.InvestVO;
import com.example.srb.core.service.LendItemService;
import com.example.srb.service2base.util.JwtUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标的出借记录表 前端控制器
 * </p>
 *
 * @author Helen
 * @since 2021-02-20
 */
@RestController
@RequestMapping("/admin/core/lendItem")
@Slf4j
@Api(tags = "标的de投资")
public class AdminLendItemController {

    @Resource
    private LendItemService lendItemService;

    @ApiOperation("获取列表")
    @GetMapping("/list/{lendId}")
    public Result list(@ApiParam(value = "标的id",required = true) @PathVariable Long lendId){
        List<LendItem> lendItemList = lendItemService.selectByLendId(lendId);
        return Result.ok().data("list",lendItemList);
    }
}

